package org.fhawk.tinyspring.core.support;

import java.lang.annotation.Annotation;

/**
 * Created by tuo on 8/17/2016.
 */
public class AnnotationClassTemplate extends ClassTemplate {
    private Class<? extends Annotation> annotationClass;

    public AnnotationClassTemplate(String basePackage, Class<? extends Annotation> annotationClass) {
        super(basePackage);
        this.annotationClass = annotationClass;
    }

    @Override
    public boolean checkAddClass(Class<?> cls) {
        return cls.isAnnotationPresent(annotationClass);
    }
}
